import java.util.Scanner;

public class ScannerTest {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入第一个数:");
        int a1 = scanner.nextInt();
        System.out.println("请输入第二个数:");
        int a2 = scanner.nextInt();
        System.out.println("两数之和是:" + (a1 + a2));
        System.out.println("两数之差是:" + (a1 - a2));
    }

}
